home *** CD-ROM | disk | FTP | other *** search
/ Delphi Developer's Kit 1996 / Delphi Developer's Kit 1996.iso / power / novtli / tispxipx.pas < prev    next >
Pascal/Delphi Source File  |  1995-12-22  |  5KB  |  145 lines

  1. unit Tispxipx;
  2.  
  3. interface
  4.  
  5. const
  6.   { Option version history }
  7.  
  8.   OPTIONS_VERSION =  1;
  9.  
  10.   OPTIONS_SIZE   = (13 * sizeof (longint));
  11.   { SPX and SPX II Option Management values }
  12.  
  13.   SPX_WATCHDOG_OFF   =   0;
  14.   SPX_WATCHDOG_ON    =   not SPX_WATCHDOG_OFF;
  15.   SPX_WATCHDOG_DEFAULT = SPX_WATCHDOG_ON;
  16.  
  17.   { SPX options only above here }
  18.  
  19.   SPX_RETRY_MIN      =   3;
  20.   SPX_RETRY_MAX      =   50;
  21.   SPX_RETRY_DEFAULT  =   10;
  22.  
  23.   { SPX II options only below here }
  24.  
  25.   SPX_WATCHDOG_TIMEOUT_MIN     =  3000;     { msec == 3 seconds }
  26.   SPX_WATCHDOG_TIMEOUT_MAX     =  300000;   { msec == 5 minutes }
  27.   SPX_WATCHDOG_TIMEOUT_DEFAULT =  60000;    { msec == 1 minute }
  28.  
  29.   SPX_MIN_RETRY_DELAY_MIN     =   1;          { msec  }
  30.   SPX_MIN_RETRY_DELAY_MAX     =   60000;      { msec == 1 minute    }
  31.   SPX_MIN_RETRY_DELAY_DEFAULT =   0;          { Protocol provider decides }
  32.   SPX_MAX_RETRY_DELTA_MIN     =   1000;       { msec == 1 second    }
  33.   SPX_MAX_RETRY_DELTA_MAX     =   60000;      { msec == 1 minute    }
  34.   SPX_MAX_RETRY_DELTA_DEFAULT =   5000;       { msec == 5 seconds    }
  35.  
  36.   SPX_OPTION_NEGOTIATE_OFF     =  0;
  37.   SPX_OPTION_NEGOTIATE_ON      =  not SPX_OPTION_NEGOTIATE_OFF;
  38.   SPX_OPTION_NEGOTIATE_DEFAULT =  SPX_OPTION_NEGOTIATE_ON;
  39.  
  40.   SPX_CONNECT_TIMEOUT_MIN      =  1000;     { msec == 1 second  }
  41.   SPX_CONNECT_TIMEOUT_MAX      =  120000;   { msec == 2 minutes    }
  42.   SPX_CONNECT_TIMEOUT_DEFAULT  =  0;        { Protocol provider decides }
  43.  
  44.   SPX_LOCAL_WINDOW_SIZE_MIN     =  1;
  45.   SPX_LOCAL_WINDOW_SIZE_MAX     =  8;
  46.   SPX_LOCAL_WINDOW_SIZE_DEFAULT =  0;        { Protocol provider decides }
  47.  
  48.   SPX2_SF_NONE                =   $00;     { Session flags, None       }
  49.   SPX2_SF_IPX_CHECKSUM        =   $01;     { Session flags, IPX Xsum   }
  50.   SPX2_SF_SPX2_SESSION        =   $02;
  51.  
  52.  
  53.  
  54.  
  55.   { T_DISCONNECT reason codes for SPX }
  56.  
  57.   TLI_SPX_CONNECTION_FAILED      = $ed;
  58.   TLI_SPX_CONNECTION_TERMINATED  = $ec;    { T_DISCONNECT from remote }
  59.   TLI_SPX_MALFORMED_PACKET       = $fe;
  60.   TLI_SPX_PACKET_OVERFLOW        = $fd;    { This is the preferred one }
  61.   TLI_SPX_UNREACHABLE_DEST       = $70;    { route not found }
  62.  
  63.   { t_rcvuderr uderr.error codes for IPX }
  64.  
  65.   TLI_IPX_MALFORMED_ADDRESS     =  $fe;
  66.   TLI_IPX_PACKET_OVERFLOW       =  $fd;
  67.  
  68.  
  69. type
  70.  
  71. IPX_ADDR = record
  72.   ipxa_net: array[0..3] of char;
  73.   ipxa_node: array[0..5] of char;
  74.   ipxa_socket: array[0..1] of char;
  75. end;
  76.  
  77. IPX_OPTS = record
  78.   ipx_type: char;        { type field for ipx header  }
  79.   ipx_pad1: array[0..2] of char;     { pad structure to 4 bytes, set to 0's }
  80.   ipx_hops: char;        { Transport Control (hop count) }
  81.   ipx_pad2: array[0..2] of char;    { pad structure to 8 bytes, set to 0's }
  82. end;
  83.  
  84. {*
  85.  *   SPX Options structure (Previous to 4.0 )
  86.  *
  87.  *   SPX II option structure, used if t_open("nspx",...) as oppossed to nspx2.
  88.  *}
  89.  
  90. SPX_OPTS = record
  91.   spx_connectionID: array[0..1] of char;
  92.   spx_allocationNumber: array[0..1] of char;
  93.   spx_pad1: array[0..3] of char;    { pad structure to 8 bytes, set to 0's }
  94. end;
  95.  
  96. SPX_OPTMGMT = record
  97.   spxo_retry_count: char;
  98.   spxo_watchdog_flag: char;
  99.   spxo_min_retry_delay: longint;
  100.   spxo_pad2: array[0..1] of char;    { pad structure to 8 bytes, set to 0's }
  101. end;
  102.  
  103. {*
  104.  *   SPX Options structure (New to 4.0 and later)
  105.  *
  106.  *   SPX II option structure, used if t_open("nspx2",...) as oppossed to nspx.
  107.  *   This stucture is used for all option managment settings and inquiries.
  108.  *   Not all members are set/returned in every option management call.
  109.  *   Option managment calls which use this common structure are:
  110.  *
  111.  *   t_getinfo    - returns size of SPX2_OPTIONS (changes as versions change)
  112.  *   t_optmgmt    - sends/returns SPX2_OPTIONS to/from protocol provider
  113.  *   t_accept     - sends SPX2_OPTIONS structure to protocol provider
  114.  *   t_connect    - sends and, if not O_NDELAY,  returns SPX2_OPTIONS
  115.  *      t_rcvconnect - returns SPX2_OPTIONS from the provider
  116.  *   t_listen     - returns SPX2_OPTIONS from the provider
  117.  *}
  118.  
  119.  
  120.  
  121. SPX2_OPTIONS = record
  122.    versionNumber: longint;           { must be set to OPTIONS_VERSION }
  123.    spxIIOptionNegotiate: longint;
  124.    spxIIRetryCount: longint;
  125.    spxIIMinimumRetryDelay: longint;
  126.    spxIIMaximumRetryDelta: longint;
  127.    spxIIWatchdogTimeout: longint;
  128.    spxIIConnectTimeout: longint;
  129.    spxIILocalWindowSize: longint;
  130.    spxIIRemoteWindowSize: longint;
  131.    spxIIConnectionID: longint;
  132.    spxIIInboundPacketSize: longint;
  133.    spxIIOutboundPacketSize: longint;
  134.    spxIISessionFlags: longint;       { version 1 ends }
  135. end;
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142. implementation
  143.  
  144. end.
  145.